import requests


class LoginApi:

    # 封装登录接口
    @classmethod
    def login(cls, body):
        url = "http://ihrm2-test.itheima.net/api/sys/login"
        head = {"Content-Type": "application/json"}
        resp = requests.post(url=url, headers=head, json=body)
        # print(resp.json())
        return resp


# if __name__ == '__main__':
#     body = {"mobile": "13800000002","password": "123456"}
#     print(LoginApi.login(body))
